import { dateFormat } from '@/util/date';
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
let now = new Date();
now.setDate(now.getDate() + 1);
export const endDate = dateFormat(now, 'yyyy-MM-dd');
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  selection: true,
  selectable:(row,index)=>{
    if(row.reviewStatus == '1'){
      return true
    }
    return false
  },
  menu: false,
  editBtn: false,
  delBtn: false,
  addBtn: false,
  viewBtn: false,
  searchMenuSpan: 6,
  column: [
	  {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "input",
      "label": "申请部门ID",
      "prop": "applyDeptId",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "input",
      "label": "调票记录表id",
      "prop": "cycleId",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "select",
      label: "申请线路",
      prop: "applyLine",
      search: true,
      cascaderItem: ["applyStation"],
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamline/dict",
      addDisplay: false,
      editDisplay:false
    },{
      "type": "select",
      label: "申请站点",
      prop: "applyStation",
      search: true,
      props: {
        label: 'name',
        value: 'code'
      },
      dicFlag: false,
      dicUrl: '/support/swparamstation/dict/{{key}}',
      addDisplay: false,
      editDisplay:false
    },	  {
      "type": "select",
      "label": "票种",
      "prop": "ticketType",
      cascaderItem: ["ticketTypeParam"],
      props:{
        label:'mainName',
        value:'mainEnName'
      },
      dicUrl:'/support/swpmticketcardtype/dict',
    },	  {
      "type": "select",
      "label": "车票名称",
      "prop": "ticketTypeParam",
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl:'/support/swpmticketcardtypeparam/dictAll/{{key}}',
    },	  {
      "type": "number",
      "label": "次数",
      "prop": "ticketNumber"
    },	  {
      "type": "number",
      "label": "金额",
      "prop": "ticketMoney",
      "precision": 2
    },	  {
      "type": "number",
      "label": "计划数量",
      "prop": "cycleNumber"
    },	  {
      "type": "datetime",
      "label": "申请时间",
      "prop": "applyTime",
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      search:true,
      searchValue: [startDate, endDate],
      searchRange: true,
      searchSpan: 12
    },	  {
      "type": "input",
      "label": "审批人",
      "prop": "makePerson",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "input",
      "label": "审批人工号",
      "prop": "makePersonCode",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "input",
      "label": "审批时间",
      "prop": "makeTime",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "select",
      "label": "审批状态",
      "prop": "reviewStatus",
      search:true,
      addDisplay: false,
      editDisplay:false,
      dicUrl:'/admin/dict/type/stm_cycle_apply_status'
    },	  {
      "type": "input",
      "label": "办理状态",
      "prop": "handleStatus",
      addDisplay: false,
      editDisplay:false,
      dicUrl:'/admin/dict/type/stm_cycle_handle_status'
    },	  {
      "type": "input",
      "label": "备注",
      "prop": "remark",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "input",
      "label": "部门id",
      "prop": "deptId",
      hide:true,
      display:false
    },	  {
      "type": "input",
      "label": "创建人id",
      "prop": "creatorId",
      hide:true,
      display:false
    },	  {
      "type": "input",
      "label": "创建人",
      "prop": "creatorName",
      hide:true,
      display:false
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide:true,
      display:false
    },	  {
      "type": "input",
      "label": "修改时间",
      "prop": "updateTime",
      hide:true,
      display:false
    } ]
};
